<style>
  .table-div{
    padding:30px;
    padding-top:15px;
    padding-bottom:0px;
  }
  .table-div table td{
    padding:10px;
    border: 1px solid rgb(233,233,233);
  }
  .table-div table th{
    padding:3px;
    border: 1px solid rgb(233,233,233);
    text-align: center;
    font-weight: bolder;
    background: rgb(246,246,246);
  }
  .table-div table tr th.goods-title{
    min-width: 200px;
    max-width:300px;
  }
  .table-div table tr th.goods-cover{
    width:70px;
    padding:3px;
  }
  .table-div table tr td.refund-edit span{
    float: left;
    margin-right:10px;
  }
</style>
<div class="table-div">
  {if $refund_info.detail}
  <table class="table" cellpadding="0" cellspacing="0">
    <thead>
    <tr>
      <th class="goods-cover">商品图片</th>
      <th class="goods-title">商品名称</th>
      <th style="width:60px">商品数量</th>
      <th style="width:60px">支付价格</th>
      <th style="width:80px" {if $refund_info.refund_status != 1}colspan="2"{/if}>小计</th>
      <th style="width:60px">状态</th>
      {if $refund_info.refund_status == 1}
      <th style="width:120px">操作</th>
      {/if}
    </tr>
    </thead>
    <tbody>
    {foreach $refund_info.detail as $k=>$v}
    <tr data-relation_id="{$v.id}">
      <td><img src="{_image($v.goods_cover, 'small')}" width="70"/></td>
      <td>{$v.goods_title}</td>
      <td class="js_refundNum" data-refund_price="{$v.refund_price}" data-refund_num="{$v.refund_num}" data-max_num="{$v.max_num}">{$v.refund_num}</td>
      <td>{$v.refund_price}</td>
      <td {if $refund_info.refund_status !=1}colspan="2"{/if}>{$v.refund_num*$v.refund_price}</td>
      <td>
        {if $v.status == 1}
        <span class="label label-primary">有效</span>
        {else}
        <span class="label label-default">失效</span>
        {/if}
      </td>
      {if $refund_info.refund_status == 1}
      <td class="refund-edit">
        {if $v.status == 1}
        <span class="btn btn-xs btn-primary js_editRefundRelation" data-type="edit">修改</span>
        <span class="btn btn-xs btn-danger js_deleteRefundRelation" data-type="delete">删除</span>
        {else}
        <span class="btn btn-xs btn-primary js_deleteRefundRelation" data-type="refresh">恢复</span>
        {/if}
      </td>
      {/if}
    </tr>
    {/foreach}
    <tr>
      <th>其他信息</th>
      <th colspan="6"></th>
    </tr>
    <tr>
      <td>订单编号:</td>
      <td colspan="6">
        <a href="{AnUrl("order/admin?search_filter[order_code]={order_helper::order_id_encode($refund_info.order_id)}")}">{order_helper::order_id_encode($refund_info.order_id)}</a><br />
      </td>
    </tr>
    <tr>
      <td>收货地址:</td>
      <td colspan="6">
        {$refund_info.receiver} {$refund_info.mobile} ({$refund_info.province} {$refund_info.city} {$refund_info.district} {$refund_info.address})<br />
      </td>
    </tr>
    <tr>
      <td>原　　因:</td>
      <td colspan="6">
        {$refund_info.note}<br />
      </td>
    </tr>
    {if $refund_info.images}
    <tr>
      <th>问题图片</th>
      <th colspan="6"></th>
    </tr>
    <tr>
      <td colspan="7" class="js_viewRefundImage">
        {foreach $refund_info.images as $k=>$v}
        <img style="float: left; margin-right: 10px; margin-bottom: 10px;" src="{_image($v.path, 'small')}" width="80"/>
        {/foreach}
      </td>
    </tr>
    {/if}
    </tbody>
  </table>
</div>
{else}
<div>
  当前退款单已失效
</div>
{/if}